<template>
  <div>
    <div class="header">
      <a href @click.prevent="to" class="mui-icon mui-icon-back"></a>
    </div>
    <div class="title">
      <img :src="'https://elm.cangdu.org/img/'+img" />
      <router-link :to="'/shop/explain?title='+title" tag="div" class="titleMsg">
        <h4>{{title}}</h4>
        <p>商家配送/分钟到达/配送费5￥</p>
        <p>公告:欢迎光临!</p>
      </router-link>
      <router-link :to="'/shop/explain?title='+title" class="right mui-icon mui-icon-arrowright"></router-link>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: ['title', 'img'],
  data() {
    return {}
  },
  methods: {
    to() {
      window.history.go(-1)
    }
  }
}
</script>
<style  scoped>
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2rem;
  z-index: 11;
  padding-top: 0.2rem;
  padding-left: 0.2rem;
}
.title {
  position: relative;
  z-index: 10;
  background-color: rgba(119, 103, 137, 0.43);
  padding: 0.4rem 0 0.4rem 0.4rem;
  width: 100%;
  overflow: hidden;
  display: flex;
}
img {
  width: 3rem;
  height: 3rem;
  display: block;
  border-radius: 0.15rem;
}
.titleMsg {
  flex: 1;
  padding: 0;
  margin: 0;
  margin-left: 5px;
  list-style: none;
  font-style: normal;
  text-decoration: none;
  border: none;
  color: #333;
  font-weight: normal;
  font-family: 'Microsoft Yahei';
  box-sizing: border-box;
}
p {
  font-size: 0.6rem;
  color: #fff;
  margin-bottom: 0.3rem;
}
h4 {
  font-size: 0.9rem;
  color: #fff;
  font-weight: bold;
  width: 100%;
  margin-bottom: 0.3rem;
}
a {
  color: white;
  font-weight: bold;
  opacity: 0.9;
}
a:hover {
  color: white;
  text-decoration: none;
}
.right {
  position: absolute;

  top: 50%;

  -webkit-transform: translateY(-50%);

  transform: translateY(-50%);

  right: 0.3rem;

  z-index: 11;
}
</style>